<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>龙虎斗卡牌游戏</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            background-attachment: fixed;
            min-height: 100vh;
            overflow-x: hidden;
            transition: background 0.3s ease;
        }

        /* 主题颜色样式 */
        body.theme-blue {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-green {
            background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-orange {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-purple {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-pink {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-red {
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-yellow {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-cyan {
            background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-lime {
            background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-indigo {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-teal {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-rose {
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-amber {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-emerald {
            background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-sky {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-violet {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        .container {
            max-width: 100%;
            margin: 0 auto;
            padding: 0;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 顶部导航栏 */
        .header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 15px 20px;
            text-align: center;
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header h1 {
            color: #333;
            font-size: 24px;
            font-weight: bold;
        }

        /* 主要内容区域 */
        .main-content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        /* Tab内容 */
        .tab-content {
            display: none;
            animation: fadeIn 0.3s ease-in;
        }

        .tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 首页样式 */
        .home-section {
            text-align: center;
            margin-bottom: 30px;
        }

        .app-logo {
            width: 120px;
            height: 120px;
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            border-radius: 20px;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: relative;
            overflow: hidden;
        }

        .app-logo::before {
            content: "🐉";
            font-size: 60px;
            animation: float 3s ease-in-out infinite;
        }

        .app-logo::after {
            content: "🐯";
            font-size: 60px;
            position: absolute;
            right: 10px;
            bottom: 10px;
            animation: float 3s ease-in-out infinite reverse;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        .game-title {
            font-size: 28px;
            font-weight: bold;
            color: white;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .game-subtitle {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 30px;
        }

        .action-buttons {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 30px;
        }

        .btn {
            padding: 18px 30px;
            border: none;
            border-radius: 15px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .btn-primary {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
            color: white;
            box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(10px);
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .btn-icon {
            font-size: 20px;
        }

        /* 游戏介绍卡片 */
        .game-info {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .game-info h3 {
            color: white;
            font-size: 20px;
            margin-bottom: 15px;
            text-align: center;
        }

        .game-info p {
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            text-align: justify;
        }

        /* 首页统计卡片样式 */
        .home-stats-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .stats-title {
            color: white;
            font-size: 18px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .stats-row-home {
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            gap: 20px;
        }

        .stat-item-home {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
            border-radius: 16px;
            padding: 25px 20px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .stat-item-home::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #4facfe, #00f2fe, #ff6b6b);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .stat-item-home:hover {
            transform: translateY(-3px);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .stat-item-home:hover::before {
            opacity: 1;
        }

        .stat-info-home {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .stat-number {
            font-size: 36px;
            font-weight: 800;
            color: white;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            line-height: 1;
        }

        .stat-unit {
            font-size: 20px;
            font-weight: 600;
            margin-left: 2px;
        }

        .stat-text {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.85);
            font-weight: 500;
            letter-spacing: 0.3px;
        }

        /* 首页签到样式 */
        .daily-checkin-home {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .checkin-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .checkin-header h3 {
            color: white;
            font-size: 20px;
            margin: 0;
        }

        .checkin-status {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: white;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .checkin-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .checkin-info {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .checkin-icon {
            font-size: 24px;
            width: 45px;
            height: 45px;
            background: linear-gradient(45deg, #4facfe, #00f2fe);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
        }

        .checkin-details {
            flex: 1;
        }

        .checkin-title {
            color: white;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 3px;
        }

        .checkin-desc {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            line-height: 1.3;
        }

        .checkin-btn-home {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
            flex-shrink: 0;
        }

        .checkin-btn-home:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
        }

        .checkin-btn-home:active {
            transform: scale(0.95);
        }

        .checkin-btn-home.completed {
            background: linear-gradient(45deg, #4caf50, #8bc34a);
            cursor: default;
        }

        .checkin-btn-home.completed .checkin-btn-text::after {
            content: " ✓";
            font-weight: bold;
        }

        /* 游戏记录 */
        .game-records {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .game-records h3 {
            color: white;
            font-size: 20px;
            margin-bottom: 15px;
            text-align: center;
        }

        .record-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
        }

        .record-item:last-child {
            border-bottom: none;
        }

        /* 底部Tab导航 */
        .tab-navigation {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 15px 0 25px;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            position: sticky;
            bottom: 0;
            z-index: 100;
        }

        .tab-buttons {
            display: flex;
            justify-content: space-around;
            align-items: center;
        }

        .tab-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            padding: 10px;
            border: none;
            background: none;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #999;
            font-size: 12px;
        }

        .tab-btn.active {
            color: #667eea;
            transform: translateY(-2px);
        }

        .tab-btn:hover {
            color: #667eea;
        }

        .tab-icon {
            font-size: 24px;
        }

        /* 游戏页面样式 */
        .game-board {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
            color: white;
        }

        /* 我的页面样式 */
        .profile-section {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 20px;
            text-align: center;
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .profile-header {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            gap: 25px;
            margin-bottom: 30px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            width: 100%;
            box-sizing: border-box;
        }

        .avatar-container {
            position: relative;
            display: block;
            margin-bottom: 0;
            flex-shrink: 0;
        }

        .profile-avatar {
            width: 120px;
            height: 120px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 60px;
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
            border: 4px solid rgba(255, 255, 255, 0.4);
        }

        .achievement-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 45px;
            height: 45px;
            background: linear-gradient(45deg, #ffd700, #ffb347);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
            border: 3px solid rgba(255, 255, 255, 0.9);
            animation: achievementGlow 2s ease-in-out infinite alternate;
        }

        @keyframes achievementGlow {
            0% {
                box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
                transform: scale(1);
            }
            100% {
                box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
                transform: scale(1.05);
            }
        }

        .profile-info {
            display: flex !important;
            flex-direction: column !important;
            gap: 12px;
            flex: 1;
            justify-content: center;
            min-width: 0;
        }

        .player-name {
            font-size: 26px;
            font-weight: 700;
            color: white;
            margin: 0;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .level-badge {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: white;
            padding: 8px 20px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            display: inline-block;
            margin-bottom: 0;
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
            align-self: flex-start;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        .stats-grid {
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .stat-item {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 15px;
            display: flex;
            align-items: center;
            gap: 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            flex: 1;
            min-width: 0;
        }

        .stat-icon {
            font-size: 24px;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .stat-content {
            text-align: left;
        }

        .stat-value {
            font-size: 18px;
            font-weight: bold;
            color: white;
            margin-bottom: 2px;
        }

        .stat-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
        }

        .profile-menu {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 5px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 18px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .menu-item:last-child {
            border-bottom: none;
        }

        .menu-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

        .menu-icon {
            font-size: 20px;
            margin-right: 15px;
            width: 30px;
            text-align: center;
        }

        .menu-text {
            flex: 1;
            color: white;
            font-size: 16px;
        }

        .menu-arrow {
            color: rgba(255, 255, 255, 0.5);
            font-size: 18px;
            font-weight: bold;
        }

        /* 经验值进度条样式 */
        .exp-progress {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            margin-top: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .exp-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .exp-text {
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            font-weight: 500;
        }

        .exp-current {
            color: white;
            font-size: 14px;
            font-weight: bold;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
            border-radius: 4px;
            transition: width 0.3s ease;
            box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
        }

        .exp-next {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            text-align: center;
        }

        /* 我的页面签到样式 */
        .daily-checkin-profile {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            margin-top: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .checkin-header-profile {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .checkin-header-profile h3 {
            color: white;
            font-size: 20px;
            margin: 0;
        }

        .checkin-status-profile {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: white;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .checkin-content-profile {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .checkin-info-profile {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .checkin-icon-profile {
            font-size: 24px;
            width: 45px;
            height: 45px;
            background: linear-gradient(45deg, #4facfe, #00f2fe);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
        }

        .checkin-details-profile {
            flex: 1;
        }

        .checkin-title-profile {
            color: white;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 3px;
        }

        .checkin-desc-profile {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            line-height: 1.3;
        }

        .checkin-btn-profile {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
            flex-shrink: 0;
        }

        .checkin-btn-profile:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
        }

        .checkin-btn-profile:active {
            transform: scale(0.95);
        }

        .checkin-btn-profile.completed {
            background: linear-gradient(45deg, #4caf50, #8bc34a);
            cursor: default;
        }

        .checkin-btn-profile.completed .checkin-btn-text-profile::after {
            content: " ✓";
            font-weight: bold;
        }



        /* 每日签到样式 */
        .daily-checkin {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 20px;
            margin-top: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .checkin-info {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .checkin-icon {
            font-size: 24px;
            width: 45px;
            height: 45px;
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
        }

        .checkin-content {
            flex: 1;
        }

        .checkin-title {
            color: white;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 3px;
        }

        .checkin-desc {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            line-height: 1.3;
        }

        .checkin-btn {
            background: linear-gradient(45deg, #4facfe, #00f2fe);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 24px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
            flex-shrink: 0;
        }

        .checkin-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
        }

        .checkin-btn:active {
            transform: scale(0.95);
        }

        .checkin-btn.completed {
            background: linear-gradient(45deg, #4caf50, #8bc34a);
            cursor: default;
        }

        .checkin-btn.completed .checkin-btn-text::after {
            content: " ✓";
            font-weight: bold;
        }

        .toggle-label {
            position: relative;
            transition: all 0.3s ease;
        }

        .toggle-label::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            top: 3px;
            left: 3px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .toggle-switch input[type="checkbox"]:checked + .toggle-label {
            background: linear-gradient(45deg, #4facfe, #00f2fe);
        }

        .toggle-switch input[type="checkbox"]:checked + .toggle-label::before {
            transform: translateX(24px);
        }

        .color-picker-trigger {
            transition: all 0.3s ease;
            flex-shrink: 0;
            margin-left: 15px;
        }

        .color-picker-trigger:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }





        /* 响应式设计 */
        @media (max-width: 480px) {
            .header h1 {
                font-size: 20px;
            }
            
            .game-title {
                font-size: 24px;
            }
            
            .btn {
                padding: 16px 25px;
                font-size: 16px;
            }
            
            .app-logo {
                width: 100px;
                height: 100px;
            }
            
            .app-logo::before {
                font-size: 50px;
            }
            
            .app-logo::after {
                font-size: 50px;
            }

            .stats-row-home {
                flex-direction: column;
                gap: 20px;
            }

            .checkin-content {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }

            .checkin-btn-home {
                width: 100%;
            }

            .stats-grid {
                flex-direction: column;
                gap: 15px;
            }

            .stat-item {
                min-width: auto;
            }

            .checkin-content-profile {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }

            .checkin-btn-profile {
                width: 100%;
            }

            .profile-header {
                flex-direction: column;
                gap: 20px;
                text-align: center;
                padding: 15px;
            }

            .profile-info {
                align-items: center;
            }

            .profile-avatar {
                width: 100px;
                height: 100px;
                font-size: 50px;
            }

            .achievement-badge {
                width: 35px;
                height: 35px;
                font-size: 18px;
                top: -5px;
                right: -5px;
            }


        }

        /* 触摸优化 */
        .btn:active {
            transform: scale(0.95);
        }

        .tab-btn:active {
            transform: scale(0.9);
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 顶部导航栏 -->
        <div class="header">
            <h1>🐉 龙虎斗卡牌 🐯</h1>
        </div>

        <!-- 主要内容区域 -->
        <div class="main-content">
            <!-- 首页Tab内容 -->
            <div id="home-tab" class="tab-content active">
                <div class="home-section">
                    <div class="app-logo"></div>
                    <h1 class="game-title">龙虎斗卡牌</h1>
                    <p class="game-subtitle">经典卡牌对战，策略与智慧的较量</p>
                    
                    <div class="action-buttons">
                        <button class="btn btn-primary" onclick="startGame()">
                            <span class="btn-icon">🎮</span>
                            开始游戏
                        </button>
                        <button class="btn btn-secondary" onclick="showGameRecords()">
                            <span class="btn-icon">📊</span>
                            游戏记录
                        </button>
                        <button class="btn btn-secondary" onclick="showGameRules()">
                            <span class="btn-icon">📖</span>
                            游戏规则
                        </button>
                        <button class="btn btn-secondary" onclick="openSettings()">
                            <span class="btn-icon">⚙️</span>
                            设置
                        </button>
                        
                    </div>
                </div>

                <div class="home-stats-section">
                    <h3 class="stats-title">📊 最近一周游戏记录</h3>
                    <div class="stats-row-home">
                        <div class="stat-item-home">
                            <div class="stat-info-home">
                                <div class="stat-number">8</div>
                                <div class="stat-text">最高连胜</div>
                            </div>
                        </div>
                        <div class="stat-item-home">
                            <div class="stat-info-home">
                                <div class="stat-number">23</div>
                                <div class="stat-text">游戏总数</div>
                            </div>
                        </div>
                        <div class="stat-item-home">
                            <div class="stat-info-home">
                                <div class="stat-number">65<span class="stat-unit">%</span></div>
                                <div class="stat-text">胜率</div>
                            </div>
                        </div>
                    </div>
                </div>


            </div>

            <!-- 游戏Tab内容 -->
            <div id="game-tab" class="tab-content">
                <div class="game-board">
                    <h2>🎮 游戏区域</h2>
                    <p>游戏功能开发中...</p>
                    <p>敬请期待！</p>
                </div>
            </div>

            <!-- 我的Tab内容 -->
            <div id="profile-tab" class="tab-content">
                <div class="profile-section">
                    <div class="profile-header">
                        <div class="avatar-container">
                            <div class="profile-avatar">👤</div>
                            <div class="achievement-badge">🏆</div>
                        </div>
                        <div class="profile-info">
                            <div class="player-name">龙虎斗玩家</div>
                            <div class="level-badge">15级</div>
                        </div>
                    </div>
                    
                    <div class="stats-grid">
                        <div class="stat-item">
                            <div class="stat-icon">💰</div>
                            <div class="stat-content">
                                <div class="stat-value">2,580</div>
                                <div class="stat-label">金币</div>
                            </div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-icon">⭐</div>
                            <div class="stat-content">
                                <div class="stat-value">1,250</div>
                                <div class="stat-label">经验值</div>
                            </div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-icon">📅</div>
                            <div class="stat-content">
                                <div class="stat-value">156</div>
                                <div class="stat-label">签到总数</div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="exp-progress">
                        <div class="exp-info">
                            <span class="exp-text">升级进度</span>
                            <span class="exp-current">1,250 / 2,000</span>
                        </div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 62.5%"></div>
                        </div>
                        <div class="exp-next">距离16级还需750经验</div>
                    </div>

                    <div class="daily-checkin-profile">
                        <div class="checkin-header-profile">
                            <h3>🎁 每日签到</h3>
                            <div class="checkin-status-profile" id="checkinStatusProfile">连续签到 5 天</div>
                        </div>
                        <div class="checkin-content-profile">
                            <div class="checkin-info-profile">
                                <div class="checkin-icon-profile">⭐</div>
                                <div class="checkin-details-profile">
                                    <div class="checkin-title-profile">今日签到</div>
                                    <div class="checkin-desc-profile">连续签到可获得额外奖励</div>
                                </div>
                            </div>
                            <button class="checkin-btn-profile" id="checkinBtnProfile" onclick="dailyCheckinProfile()">
                                <span class="checkin-btn-text-profile">立即签到</span>
                            </button>
                        </div>
                    </div>



                </div>

                <div class="profile-menu">
                    <div class="menu-item" onclick="openAchievements()">
                        <div class="menu-icon">🏆</div>
                        <div class="menu-text">我的成就</div>
                        <div class="menu-arrow">></div>
                    </div>
                    <div class="menu-item" onclick="openGameStats()">
                        <div class="menu-icon">📊</div>
                        <div class="menu-text">游戏统计</div>
                        <div class="menu-arrow">></div>
                    </div>
                    <div class="menu-item" onclick="openDailyCheckin()">
                        <div class="menu-icon">🎁</div>
                        <div class="menu-text">每日签到</div>
                        <div class="menu-arrow">></div>
                    </div>
                    <div class="menu-item" onclick="openSettings()">
                        <div class="menu-icon">⚙️</div>
                        <div class="menu-text">游戏设置</div>
                        <div class="menu-arrow">></div>
                    </div>
                </div>
            </div>

            <!-- 设置Tab内容 -->
            <div id="settings-tab" class="tab-content">

            </div>
        </div>

        <!-- 底部Tab导航 -->
        <div class="tab-navigation">
            <div class="tab-buttons">
                <button class="tab-btn active" onclick="switchTab('home')">
                    <div class="tab-icon">🏠</div>
                    <span>首页</span>
                </button>
                <button class="tab-btn" onclick="switchTab('game')">
                    <div class="tab-icon">🎮</div>
                    <span>游戏</span>
                </button>
                <button class="tab-btn" onclick="switchTab('profile')">
                    <div class="tab-icon">👤</div>
                    <span>我的</span>
                </button>

            </div>
        </div>
    </div>



    <script>
        // Tab切换功能
        function switchTab(tabName) {
            // 隐藏所有tab内容
            const tabContents = document.querySelectorAll('.tab-content');
            tabContents.forEach(content => {
                content.classList.remove('active');
            });

            // 显示选中的tab内容
            document.getElementById(tabName + '-tab').classList.add('active');

            // 更新tab按钮状态
            const tabButtons = document.querySelectorAll('.tab-btn');
            tabButtons.forEach(btn => {
                btn.classList.remove('active');
            });

            // 激活当前tab按钮
            event.currentTarget.classList.add('active');
        }

        // 开始游戏功能
        function startGame() {
            // 切换到游戏tab
            switchTab('game');
            
            // 更新tab按钮状态
            const tabButtons = document.querySelectorAll('.tab-btn');
            tabButtons.forEach(btn => {
                btn.classList.remove('active');
            });
            document.querySelector('.tab-btn:nth-child(2)').classList.add('active');
        }

        // 显示游戏记录
        function showGameRecords() {
            window.location.href = 'game_records.html';
        }

        // 显示游戏规则
        function showGameRules() {
            window.location.href = 'game_rules.html';
        }



        // 触摸事件优化
        document.addEventListener('touchstart', function() {}, {passive: true});
        document.addEventListener('touchmove', function() {}, {passive: true});

        // 设置开关功能
        document.addEventListener('DOMContentLoaded', function() {
            // 背景音乐开关
            const bgMusicToggle = document.getElementById('bgMusicToggle');
            bgMusicToggle.addEventListener('change', function() {
                if (this.checked) {
                    console.log('背景音乐已开启');
                    // 这里可以添加播放背景音乐的逻辑
                } else {
                    console.log('背景音乐已关闭');
                    // 这里可以添加停止背景音乐的逻辑
                }
            });

            // 深色模式开关
            const darkModeToggle = document.getElementById('darkModeToggle');
            darkModeToggle.addEventListener('change', function() {
                if (this.checked) {
                    console.log('深色模式已开启');
                    document.body.classList.add('dark-mode');
                } else {
                    console.log('深色模式已关闭');
                    document.body.classList.remove('dark-mode');
                }
            });

            // 检查今日是否已签到
            checkTodayCheckin();

                    // 检查并同步主题
        checkAndSyncTheme();
        
        // 启动主题监听器
        startThemeListener();
        
        // 监听页面可见性变化，当用户从设置页面返回时立即同步主题
        document.addEventListener('visibilitychange', function() {
            if (!document.hidden) {
                console.log('页面变为可见，检查主题更新');
                checkAndSyncTheme();
            }
        });
        
        // 添加主题同步测试按钮（临时）
        console.log('主题同步功能已启动');
        console.log('当前保存的主题:', localStorage.getItem('selectedTheme'));
        console.log('主题更新时间:', localStorage.getItem('themeUpdateTime'));

            // 音量滑块事件
            const volumeSlider = document.getElementById('volumeSlider');
            volumeSlider.addEventListener('input', function() {
                console.log('音效音量设置为:', this.value + '%');
                // 这里可以添加音量控制逻辑
            });

                    // 新手模式开关事件
        const newbieToggle = document.getElementById('newbieToggle');
        newbieToggle.addEventListener('change', function() {
            if (this.checked) {
                console.log('新手模式已开启');
                // 这里可以添加新手模式开启逻辑
            } else {
                console.log('新手模式已关闭');
                // 这里可以添加新手模式关闭逻辑
            }
        });

        });

        // 打开设置页面
        function openSettings() {
            window.location.href = 'settings.html';
        }

        // 打开成就页面
        function openAchievements() {
            window.location.href = 'my_achievements.html';
        }

        // 打开游戏统计页面
        function openGameStats() {
            window.location.href = 'game_records.html';
        }

        // 打开每日签到页面
        function openDailyCheckin() {
            window.location.href = 'daily_checkin.html';
        }







        // 应用主题颜色
        function applyTheme(theme) {
            console.log('首页应用主题:', theme);
            
            // 移除所有主题类
            const body = document.body;
            const allThemes = ['theme-blue', 'theme-green', 'theme-orange', 'theme-purple', 
                              'theme-pink', 'theme-red', 'theme-yellow', 'theme-cyan', 
                              'theme-lime', 'theme-indigo', 'theme-teal', 'theme-rose', 
                              'theme-amber', 'theme-emerald', 'theme-sky', 'theme-violet'];
            
            allThemes.forEach(themeClass => {
                body.classList.remove(themeClass);
            });
            
            // 添加新主题类
            if (theme && theme !== 'default') {
                body.classList.add('theme-' + theme);
                console.log('已应用主题类:', 'theme-' + theme);
            }
        }

        // 检查并同步主题
        function checkAndSyncTheme() {
            const savedTheme = localStorage.getItem('selectedTheme');
            const lastUpdateTime = localStorage.getItem('themeUpdateTime');
            
            if (savedTheme && lastUpdateTime) {
                console.log('检测到保存的主题:', savedTheme);
                applyTheme(savedTheme);
            }
        }

        // 监听主题变化
        function startThemeListener() {
            let lastThemeUpdateTime = localStorage.getItem('themeUpdateTime') || '0';
            
            // 定期检查主题更新
            setInterval(() => {
                const currentThemeUpdateTime = localStorage.getItem('themeUpdateTime') || '0';
                
                if (currentThemeUpdateTime !== lastThemeUpdateTime) {
                    console.log('检测到主题更新');
                    lastThemeUpdateTime = currentThemeUpdateTime;
                    
                    const savedTheme = localStorage.getItem('selectedTheme');
                    if (savedTheme) {
                        console.log('同步新主题:', savedTheme);
                        applyTheme(savedTheme);
                    }
                }
            }, 500); // 每500毫秒检查一次，提高响应速度
        }

        // 每日签到功能
        function dailyCheckin() {
            const checkinBtn = document.getElementById('checkinBtn');
            const checkinText = checkinBtn.querySelector('.checkin-btn-text');
            
            // 检查是否已经签到
            if (checkinBtn.classList.contains('completed')) {
                alert('今日已签到，明天再来吧！');
                return;
            }

            // 执行签到
            checkinBtn.classList.add('completed');
            checkinText.textContent = '已签到';
            
            // 更新签到总数
            const checkinCount = document.querySelector('.stat-item:nth-child(3) .stat-value');
            const currentCount = parseInt(checkinCount.textContent);
            checkinCount.textContent = currentCount + 1;
            
            // 显示签到成功提示
            alert('签到成功！获得金币奖励！');
            
            // 保存签到状态到本地存储
            const today = new Date().toDateString();
            localStorage.setItem('lastCheckin', today);
            localStorage.setItem('checkinCount', checkinCount.textContent);
        }

        // 我的页面每日签到功能
        function dailyCheckinProfile() {
            const checkinBtn = document.getElementById('checkinBtnProfile');
            const checkinText = checkinBtn.querySelector('.checkin-btn-text-profile');
            
            // 检查是否已经签到
            if (checkinBtn.classList.contains('completed')) {
                alert('今日已签到，明天再来吧！');
                return;
            }

            // 执行签到
            checkinBtn.classList.add('completed');
            checkinText.textContent = '已签到';
            
            // 更新签到总数
            const checkinCount = document.querySelector('.stat-item:nth-child(3) .stat-value');
            if (checkinCount) {
                const currentCount = parseInt(checkinCount.textContent);
                checkinCount.textContent = currentCount + 1;
            }
            
            // 显示签到成功提示
            alert('签到成功！获得金币奖励！');
            
            // 保存签到状态到本地存储
            const today = new Date().toDateString();
            localStorage.setItem('lastCheckin', today);
            if (checkinCount) {
                localStorage.setItem('checkinCount', checkinCount.textContent);
            }
        }

        // 检查今日是否已签到
        function checkTodayCheckin() {
            const lastCheckin = localStorage.getItem('lastCheckin');
            const today = new Date().toDateString();
            
            // 检查"我的"页面的签到按钮
            const checkinBtnProfile = document.getElementById('checkinBtnProfile');
            if (checkinBtnProfile) {
                const checkinTextProfile = checkinBtnProfile.querySelector('.checkin-btn-text-profile');
                if (lastCheckin === today) {
                    checkinBtnProfile.classList.add('completed');
                    checkinTextProfile.textContent = '已签到';
                }
            }
            
            // 恢复签到总数
            const savedCount = localStorage.getItem('checkinCount');
            if (savedCount) {
                const checkinCount = document.querySelector('.stat-item:nth-child(3) .stat-value');
                if (checkinCount) {
                    checkinCount.textContent = savedCount;
                }
            }
        }



        // 防止双击缩放
        let lastTouchEnd = 0;
        document.addEventListener('touchend', function(event) {
            const now = (new Date()).getTime();
            if (now - lastTouchEnd <= 300) {
                event.preventDefault();
            }
            lastTouchEnd = now;
        }, false);
    </script>
</body>
</html>

